package com.xinzhi.savingpot.rminfo.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.xinzhi.savingpot.enums.StatusCode;
import com.xinzhi.savingpot.rminfo.entity.Members;
import com.xinzhi.savingpot.rminfo.mapper.IVipMapper;
import com.xinzhi.savingpot.rminfo.service.IVipService;
import com.xinzhi.savingpot.util.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VipServiceImpl implements IVipService {

     @Autowired
    private IVipMapper ivm;

    @Override
    public BaseResponse GetMembers() {
        List<Members> members = ivm.GetMembers();
        if(!members.isEmpty()){
            return new BaseResponse(200,"获取成功",members);
        }
        return new BaseResponse (StatusCode.Fail);
    }
}